'use strict';
const routerMiddle = require('../router/index');
const koaBody = require('koa-bodyparser');

const mdRoute = routerMiddle.routes();
const mdRouterAllowed = routerMiddle.allowedMethods();

const mdKoaBody = koaBody({
    enableTypes: [ 'json', 'form', 'text', 'xml' ],
    formLimit: '56kb',
    jsonLimit: '1mb',
    textLimit: '1mb',
    xmlLimit: '1mb',
    strict: true,
});

module.exports = [
    mdKoaBody,
    mdRoute,
    mdRouterAllowed,
]